#ifndef _PACKETHANDLER_H_
#define _PACKETHANDLER_H_

#include "Net.h"

namespace car
{

	#ifndef kMinPacketLength
	#define kMinPacketLength 8
	#endif

	class Player;
	class Room;
	class Server;

	class PacketHandler
	{
	public:
		PacketHandler(void);
		~PacketHandler(void);

		static void handlePacket( LASAddress & address, Server * server, unsigned char data[], int size );
		static int	wrapPlayerPacket( Player * player, unsigned char * data, int size );
		static int	wrapRoomPacket( Room * room, unsigned char data[], int size );
		static int	wrapRoomListPacket( Server * server, Player * player, unsigned char data[], int size );
	};

};

#endif
